﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExpertMIS.Admin.UserControl;

namespace ExpertMIS.Admin
{
    public partial class ExpertForm : ExpertMIS.Codes.AdminAuthenticationPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (string.IsNullOrEmpty(Request["oid"]))
                {
                    retExpertForm.LoadExpert("-1");
                }
                else
                {
                    retExpertForm.LoadExpert(Request["oid"]);
                }
            }
        }

        protected void lbSave_Click(object sender, EventArgs e)
        {
            if (retExpertForm.SaveExpert())
            {
                Response.Redirect("ExpertList.aspx");
            }
        }

        protected void lbBack_Click(object sender, EventArgs e)
        {
            Response.Redirect("ExpertList.aspx");
        }
    }
}
